home *** CD-ROM | disk | FTP | other *** search
- -- InitPanoCallbacks
- --
- -- Initializes the callbacks used for panoramic movies.
- -------------------------------------------------------------------------------
- on InitPanoCallbacksXtra
- global gQTVRInstanceXtra
-
-
- if not VOIDP(gQTVRInstanceXtra) then
-
- if IsQTVRMovie(gQTVRInstanceXtra) then
-
- QTVRSetRolloverHotSpotHandler(gQTVRInstanceXtra,"RolloverHandlerXtra")
- --QTVRSetMouseOverHandler(gQTVRInstanceXtra,"MouseOverHandlerXtra")
- --QTVRSetMouseDownHandler(gQTVRInstanceXtra,"MouseDownHandlerXtra")
-
- -- replaced following with above JHB 4/11
-
- --QTVRSetRolloverHotSpotHandler(gQTVRInstanceXtra,empty)
- QTVRSetMouseOverHandler(gQTVRInstanceXtra,empty)
- QTVRSetMouseDownHandler(gQTVRInstanceXtra,empty)
- QTVRSetPanZoomStartHandler(gQTVRInstanceXtra,empty)
- QTVRSetMouseStillDownHandler(gQTVRInstanceXtra,empty)
- QTVRSetNodeLeaveHandler(gQTVRInstanceXtra,empty)
- end if
- else
-
- end if
-
-
-
-
-
- end
-
-
- --=============================================================================
- -- XCMD Callback Factory
- -------------------------------------------------------------------------------
-
-
-
- --=============================================================================
- -- CallBackTracer
- --
- -- As described in "Using Lingo", Appendix A. Pass any mSendCardMessage
- -- commands on to Lingo so that callbacks can be handled.
- -- used only on Mac
- -------------------------------------------------------------------------------
- factory CallBackTracer
-
- method mNew
-
- method mEvalExpr pExpr
-
- method mSendHCMessage pMessage
-
- method mSendCardMessage pMessage
- do pMessage
-
- method mGetFieldByName pCard, pName
-
- method mGetFieldByNum pCard, pNum
-
- method mGetFieldByID pCard, pID
-
- method mSetFieldByName pCard, pName, pValue
-
- method mSetFieldByNum pCard, pNum, pValue
-
- method mSetFieldByID pCard, pID, pValue
-
- end
-
-
- --=============================================================================
- -- Routines used by Pano Callbacks screens
- -------------------------------------------------------------------------------
-
-
- on TestMouseOverHandlerXtra
- global gQTVRInstanceXtra
- if IsQTVRMovie(gQTVRInstanceXtra) then
- put "In mouse over at: " & the ticks into member "MouseOverHandler Message"
- end if
- end
-
- on TestRolloverHotSpotHandlerXtra pHotSpotID
- global gQTVRInstanceXtra
- if IsQTVRMovie(gQTVRInstanceXtra) then
- if pHotSpotID = 0 then
- put "ID: " & pHotSpotID & RETURN & "Name:" into member "RolloverHotSpotHandler Message"
- else
- QTVRSetHotSpotID(gQTVRInstanceXtra, integer(pHotSpotID))
- set spotName = QTVRGetHotSpotName(gQTVRInstanceXtra)
- put "ID: " & pHotSpotID & RETURN & "Name: " & spotName into member "RolloverHotSpotHandler Message"
- end if
- end if
- end
-
- on TestMouseDownHandlerXtra
- global gQTVRInstanceXtra
- if IsQTVRMovie(gQTVRInstanceXtra) then
- put "In mouse down at: " & the ticks into member "MouseDownHandler Message"
- QTVRPassMouseDown(gQTVRInstanceXtra)
- end if
- end
-
- on TestPanZoomStartHandlerXtra
- global gQTVRInstanceXtra
- if IsQTVRMovie(gQTVRInstanceXtra) then
- put "In pan zoom start at: " & the ticks into member "PanZoomStartHandler Message"
- end if
- end
-
- on TestMouseStillDownHandlerXtra
- global gQTVRInstanceXtra
- if IsQTVRMovie(gQTVRInstanceXtra) then
- put "In mouse still down at: " & the ticks into member "MouseStillDownHandler Message"
- put RETURN & QTVRGetPanAngle(gQTVRInstanceXtra) after member "MouseStillDownHandler Message"
- end if
- end
-
- on TestNodeLeaveHandlerXtra pToNode
- global gQTVRInstanceXtra
- if IsQTVRMovie(gQTVRInstanceXtra) then
- put "Leaving node ID: " & pToNode into member "NodeLeaveHandler Message"
- end if
- end
-
- --------------------
- --TDC mouse routines
- ------------------
- --=============================================================================
- -- MouseOverHandler
- --
- -- Called by PanoMovie periodically during mouseOver.
- -------------------------------------------------------------------------------
- on MouseOverHandlerXtra
- global gQTVRInstanceXtra
- --put "Mouse over panoramic movie"
- -- If you want to exit from mouseOver, use this line
- global gQTVRInstanceXtra
- if IsQTVRMovie(gQTVRInstanceXtra) then
- -- QTVRExitMouseOver(gQTVRInstanceXtra)
- end if
- end
-
-
- --=============================================================================
- -- pHotSpotID is the id of the hot spot the user is over
- --
- -- Called by PanoMovie whenever the hot spot the cursor is over changes.
- -- Used by TDC movie
- -------------------------------------------------------------------------------
- on RolloverHandlerXtra pHotSpotID
- global gQTVRInstanceXtra, gHotSpot
-
- --put QTVRGetHotSpotID(gQTVRInstanceXtra)
- --put pHotSpotID
- put integer(pHotSpotID) into gHotSpot
- checkCurrentVRHotSpot
- --put pHotSpotID into cast "Current Hot Spot ID"
- end
-
-
- --=============================================================================
- -- SampleMouseDownHandler
- --
- -- Called by PanoMovie when a mouseDown event occurs during a mouseOver call
- -------------------------------------------------------------------------------
-
- -- is this script needed?
- -- disable in the pano callbacks script
- -- JHB
-
- on MouseDownHandlerXtra
- --put "Mouse down during mouseOver call"
- put QTVRGetHotSpotID(gQTVRInstanceXtra)
-
- global gPanoMovieID
- if IsQTVRMovie(gQTVRInstanceXtra) then
- QTVRPassMouseDown(gQTVRInstanceXtra)
- end if
- end
-
-
-
-
-
-
-
-
- --=============================================================================
-
-
-
-
-
- --=============================================================================
- -- Sample PanoMovie callback handler routines
- -------------------------------------------------------------------------------
-
- --=============================================================================
- -- SampleMouseOverHandler
- --
- -- Called by PanoMovie periodically during mouseOver.
- -------------------------------------------------------------------------------
- on SampleMouseOverHandlerXtra
- put "Mouse over panoramic movie"
- -- If you want to exit from mouseOver, use this line
- global gQTVRInstanceXtra
- if IsQTVRMovie(gQTVRInstanceXtra) then
- -- QTVRExitMouseOver(gQTVRInstanceXtra)
- end if
- end
-
- --=============================================================================
- -- SampleRolloverHandler
- -- pHotSpotID is the id of the hot spot the user is over
- --
- -- Called by PanoMovie whenever the hot spot the cursor is over changes.
- -------------------------------------------------------------------------------
- on SampleRolloverHotSpotHandlerXtra pHotSpotID
- global gQTVRInstanceXtra
-
- -- put QTVRGetHotSpotID(gQTVRInstanceXtra) into member "Current Hot Spot ID"
- put pHotSpotID into cast "Current Hot Spot ID"
- end
-
-
-
- --=============================================================================
- -- SampleMouseDownHandler
- --
- -- Called by PanoMovie when a mouseDown event occurs during a mouseOver call
- -------------------------------------------------------------------------------
- on SampleMouseDownHandler
- put "Mouse down during mouseOver call"
-
- global gPanoMovieID
- if IsQTVRMovie(gQTVRInstanceXtra) then
- QTVRPassMouseDown(gQTVRInstanceXtra)
- end if
- end
-
- --=============================================================================
- -- SamplePanZoomStartHandler
- --
- -- Called once by PanoMovie when the user starts to pan or zoom.
- -------------------------------------------------------------------------------
- on SamplePanZoomStartHandlerXtra
- put "About to pan or zoom in panoramic movie"
- end
-
- --=============================================================================
- -- SampleMouseStillDownHandler
- --
- -- Called by PanoMovie periodically during while the mouse is down within
- -- mouseOver or mouseDown.
- -------------------------------------------------------------------------------
- on SampleMouseStillDownHandlerXtra
- put "Enter mouse still down from panoramic movie"
- global gQTVRInstanceXtra
- if IsQTVRMovie(gQTVRInstanceXtra) then
- -- put QTVRGetPanAngle(gQTVRInstanceXtra) into tPanAngle
- -- put "PanAngle is currently: " & tPanAngle
- end if
- put "Leave mouse still down from panoramic movie"
- end
-
- --=============================================================================
- -- SampleNodeLeaveHandler
- -- pToNodeID is the id of the node the user is leaving
- --
- -- Called by PanoMovie when the user moves between nodes by clicking on link
- -- hot spots.
- -------------------------------------------------------------------------------
- on SampleNodeLeaveHandlerXtra pToNode
- put "Jumping to node " & pToNode & " in panoramic movie"
- end